/*
 * Copyright (c) 2005 -2008 Reliable Source, Inc. and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Mozilla Public License v.1.1,
 * BSD, and Eclipse Public License v1.0 which accompanies this
 * distribution and is available at:
 *
 * 		http://www.eclipse.org/legal/epl-v10.html
 * 		http://www.opensource.org/licenses/bsd-license.php
 * 		http://www.mozilla.org/MPL/MPL-1.1.html
 *
 * Contributors:
 *     IBM Corporation	     -  http://ibm.com
 *     	- initial API and implementation
 *
 *     patientos.org         - http://patientos.org
 *     	- domain and database persistence layer
 *
 *     Reliable Source, Inc. - http://reliablesource.org
 *     	- Symbiosys Application Framework,
 *     	- Symbiosys Application, Symbiosys Product
 *
 */
package org.reliablesource.symbiosys.workbench.tests.mockobjects;

import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.tests.harness.util.CallHistory;

import org.reliablesource.client.ui.viewers.IReliableViewer;
import org.reliablesource.client.ui.workbench.views.ReliableViewPart;

import org.reliablesource.symbiosys.ui.tests.viewers.MockSelectorViewer;

/**
 * 
 * MockViewPart.java<br>
 * Created on: Jun 27, 2008<br>
 *
 * @author <a href="mailto:dennis.park@gmail.com">Dennis Park</a>
 *
 * @category
 * @since 1.0
 */
public class MockViewPart extends ReliableViewPart {
    public static String ID = "org.reliablesource.symbiosys.workbench.tests.mockobjects.views.mockpart";
    public static String ID2 = ID + "2";
    public static String ID3 = ID + "3";
    public static String ID4 = ID + "4";
    public static String IDMULT = ID + "Mult";
    public static String NAME = "Mock View 1";
    protected CallHistory callTrace;
    protected MockSelectionProvider selectionProvider;

    public MockViewPart() {
        super();
        callTrace = new CallHistory(this);
    }

    /**
     * @see IViewPart#init(IViewSite)
     */
    public void init(IViewSite site) throws PartInitException {
        super.init(site);
        setSite(site);
        callTrace.add("init");
    }

    /* (non-Javadoc)
     * @see org.reliablesource.client.ui.workbench.views.ReliableViewPart#createViewer()
     */
    @Override
    protected IReliableViewer createViewer() {
        return new MockSelectorViewer();
    }

    /* (non-Javadoc)
     * @see org.reliablesource.client.ui.workbench.views.IReliableViewPart#getPartId()
     */
    public String getPartId() {
        return ID;
    }
}
